package com.ztgf.order.mapper.purchase;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ztgf.order.models.dto.purchase.PurchaseCommodityDTO;
import com.ztgf.order.models.vo.purchase.PurchaseCommodityVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 采购商品表映射
 *
 * @author mxli
 * @Date 2021-05-17 10:16:25
 */
public interface PurchaseCommodityMapper extends BaseMapper<PurchaseCommodityDTO> {


    List<PurchaseCommodityVO> queryHomeList(@Param("purchaseId") Long purchaseId);

    List<PurchaseCommodityVO> queryBuyList(@Param("purchaseId") Long purchaseId);

    List<PurchaseCommodityVO> querySellList(@Param("purchaseId") Long purchaseId, @Param("shopId") Long shopId);

    List<PurchaseCommodityVO> querySellAllList(@Param("purchaseId") Long purchaseId, @Param("shopId") Long shopId);

    /**
     * 平台议价商品
     * @param purchaseId
     * @return
     */
    List<PurchaseCommodityVO> queryPlatBargainList(@Param("purchaseId") Long purchaseId, @Param("platBargainType") Integer platBargainType);

    /**
     * admin查询用户列表
     * @param purchaseId
     * @return
     */
    List<PurchaseCommodityVO> queryAdminList(@Param("purchaseId") Long purchaseId);

    /**
     * admin查询用户列表
     * @param purchaseId
     * @return
     */
    List<PurchaseCommodityVO> queryOwnList(@Param("purchaseId") Long purchaseId);


    /**
     * description: 根据采购purchaseId查询具体报价商品信息
     * param: [purchaseId]
     * author: zeming.lv
     * date: 2021-05-18
     * return: com.ztgf.order.models.vo.purchase.PurchaseCommodityVO
     */
    PurchaseCommodityVO getPurchaseCommodity(@Param("purchaseId") Long purchaseId);
}
